package com.dlink.sqljobsync.event;

import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationEvent;

/**
 * kafka Sql处理事件
 * @author ASUS
 */
@Getter
@Setter
@Slf4j
public class KafkaNoticeEvent extends ApplicationEvent {

    /**
     * 存储sql信息
     */
    private String sql;

    /**
     * flinky运行模式
     */
    private String flinkysType;

    /**
     * 运行集群地址
     */
    private String flinkAddress;

    public KafkaNoticeEvent(String sql, String flinkysType, String flinkAddress) {
        super(flinkysType);
        this.sql = sql;
        this.flinkysType = flinkysType;
        this.flinkAddress = flinkAddress;
        log.info("获取Kafka执行sql成功: "+sql);
    }

}
